﻿@model IEnumerable<WhiteGloss.Models.Artist>

@{
    ViewBag.Title = "Index";
}

<h2>Artists</h2>

<p>
    @Html.ActionLink("Create New Artist", "Create") &nbsp;&nbsp;|&nbsp;&nbsp; 
    @Html.ActionLink("Upload Images", "Create", "Images")
</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Bio
        </th>
        <th>
            Bio Image
        </th>
        <th>
            HomePage Image
        </th>
        <th>
            Created Date
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Bio)
        </td>
        <td>
            <a href="@item.BioImage">@Html.DisplayFor(modelItem => item.BioImage)</a>
        </td>
        <td>            
            <a href="@item.HomePageImage">@Html.DisplayFor(modelItem => item.HomePageImage)</a>
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreatedDate)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.ArtistId }) |
            @Html.ActionLink("Details", "Details", new { id = item.ArtistId }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.ArtistId })
        </td>
    </tr>
}

</table>
